<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>函数参数的默认值设置</title>
	</head>
	<body>
		<script>
			
			function add(a,b,c=20){
				return a + b + c;
			}
			console.log(add(3,5));
			function connect({host = '111.111.222.11',username,password,port}) {
				console.log(host);
				console.log(username);
				console.log(password);
				console.log(port);
			}
			
			connect({
				username: 'www',
				password : 'eeeww',
				port:3333
			});
		</script>
	</body>
</html>